<!DOCTYPE html>
<html>
<head>
  <title>预防针预约系统</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body style="background-color: rgb(128, 230, 128);">

    <nav class="navbar navbar-expand-md bg-success navbar-dark fixed-top">
        <a class="navbar-brand" href="{:url('home/index')}">首页</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="collapsibleNavbar">
            <ul class="navbar-nav justify-content-center">
                <!-- <li class="nav-item">
                  <a class="navbar-brand" href="#">首页</a>
                </li> -->
                <li class="nav-item">
                    <a class="navbar-brand" href="{:url('appointment/index')}">进行预约</a>
                  </li>
                  <li class="nav-item">
                    <a class="navbar-brand" href="{:url('progress/index')}">预约进度</a>
                  </li>
                  <li class="nav-item">
                    <a class="navbar-brand" href="{:url('me/index')}">个人中心</a>
                  </li>
                  <li class="nav-item">
                    <a class="navbar-brand" href="{:url('index/logout')}">注销</a>
                  </li>
            </ul>
        </div>
    </nav>
<div class="container" style="margin-top:80px">
 
  <!-- Nav tabs -->
  <ul class="nav nav-tabs nav-justified" role="tablist">
    <li class="nav-item">
      <a class="nav-link active" data-toggle="tab" href="#home">受理中</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" data-toggle="tab" href="#menu1">已办理</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" data-toggle="tab" href="#menu2">已取消</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" data-toggle="tab" href="#menu3">全部</a>
      </li>
  </ul>

  <!-- Tab panes -->
<div class="tab-content">
    <div id="home" class="container tab-pane active" style="padding: 0 0;margin-top:10px;"><br>
        <!-- 2 -->
        {volist name="res1" id="vo"}
        <div class="card" style="padding: 0 10;margin-top:10px">
            <div class="card-body" style="padding: 0 0;">
                <div class="d-flex mb-1">
                    <div class="p-1">孩子姓名:</div>
                    <div class="p-1 ml-auto ">{$vo.child_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预防针类型:</div>
                    <div class="p-1 ml-auto ">{$vo.vaccine_effect}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约地点:</div>
                    <div class="p-1 ml-auto ">{$vo.hospital_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约时间:</div>
                    <div class="p-1 ml-auto ">{$vo.begin_time}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1 ml-auto ">
                        <button type="button" class="btn btn-outline-primary btn-sm" value="{$vo.appointment_id}" onclick="del(this.value)">取消</button>
                    </div>
                </div>
            </div>
        </div>
        {/volist}
    </div>
    <div id="menu1" class="container tab-pane fade" style="padding: 0 0;margin-top:10px"><br>
        {volist name="res2" id="vo"}
        <div class="card" style="padding: 0 10;margin-top:10px">
            <div class="card-body" style="padding: 0 0;">
                <div class="d-flex mb-1">
                    <div class="p-1">孩子姓名:</div>
                    <div class="p-1 ml-auto ">{$vo.child_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预防针类型:</div>
                    <div class="p-1 ml-auto ">{$vo.vaccine_effect}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约地点:</div>
                    <div class="p-1 ml-auto ">{$vo.hospital_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约时间:</div>
                    <div class="p-1 ml-auto ">{$vo.begin_time}</div>
                </div>
            </div>
        </div>
        {/volist}
    </div>
    <div id="menu2" class="container tab-pane fade" style="padding: 0 0;margin-top:10px"><br>
        {volist name="res3" id="vo"}
        <div class="card" style="padding: 0 10;margin-top:10px">
            <div class="card-body" style="padding: 0 0;">
                <div class="d-flex mb-1">
                    <div class="p-1">孩子姓名:</div>
                    <div class="p-1 ml-auto ">{$vo.child_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预防针类型:</div>
                    <div class="p-1 ml-auto ">{$vo.vaccine_effect}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约地点:</div>
                    <div class="p-1 ml-auto ">{$vo.hospital_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约时间:</div>
                    <div class="p-1 ml-auto ">{$vo.begin_time}</div>
                </div>
                <div class="d-flex mb-1 float-right">
                    <div class="p-1 ">
                        <a href="{:url('progress/xiugai',['id'=>$vo.appointment_id])}"><button type="button"  class="btn btn-outline-primary btn-sm " >修改预约</button></a>
                    </div>
                    <div class="p-1">
                        <button type="button" class="btn btn-outline-primary btn-sm" value="{$vo.appointment_id}" onclick="anew(this.value)">重新预约</button>
                    </div>
                </div>
            </div>
        </div>
        {/volist}
    </div>
    <div id="menu3" class="container tab-pane fade" style="padding: 0 0;margin-top:10px"><br>
        {volist name="res4" id="vo"}
        <div class="card" style="padding: 0 10;margin-top:10px">
            <div class="card-body" style="padding: 0 0;">
                <div class="d-flex mb-1">
                    <div class="p-1">孩子姓名:</div>
                    <div class="p-1 ml-auto ">{$vo.child_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预防针类型:</div>
                    <div class="p-1 ml-auto ">{$vo.vaccine_effect}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约地点:</div>
                    <div class="p-1 ml-auto ">{$vo.hospital_name}</div>
                </div>
                <div class="d-flex mb-1">
                    <div class="p-1">预约时间:</div>
                    <div class="p-1 ml-auto ">{$vo.begin_time}</div>
                </div>
            </div>
        </div>
        {/volist}
    </div>
</div>
</div>

<div class="bg-light fixed-bottom " style="margin-bottom:0;padding: 0 0;">
    <div> <p class="text-center">@2020-tch</p></div>
   
  </div>
</body>
<script>
    function del(value){
        if (confirm("确认要取消吗？")){
            console.log(value);
            window.location.href='{:url("progress/updatestatus")}?appointment_id='+value;
        }else{
            // alert("已经取消");
        }
    }
    function anew(value){
        if (confirm("确认要重新预约吗？")){
            console.log(value);
            window.location.href='{:url("progress/newstatus")}?appointment_id='+value;
        }else{
            // alert("已经取消");
        }
    }
    document.getElementById("home").children[document.getElementById("home").children.length-1].style.marginBottom =60 + 'px' ;
    document.getElementById("menu1").children[document.getElementById("menu1").children.length-1].style.marginBottom =60 + 'px' ;
    document.getElementById("menu2").children[document.getElementById("menu2").children.length-1].style.marginBottom =60 + 'px' ;
    document.getElementById("menu3").children[document.getElementById("menu3").children.length-1].style.marginBottom =60 + 'px' ;

    
   
</script>
</html>